<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0,viewport-fit=cover">
    <meta name="renderer" content="webkit">
    <meta name="force-rendering" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" href="/static/base.css">
    <title th:text="'首页 - ' + ${app_name}">首页 - XXX</title>
    <style>
        .Button2 {
            color:#333;
            outline: none;
        }
    </style>
</head>

<body>
<div id="Wrapper">
    <div class="Header">
        <div class="Header-title">首页</div>
        <div class="Header-subTitle" th:text="${app_name}">XXX</div>
    </div>
    <form class="Form">
        <div class="Form-login">
            <label class="Label">
                <input th:value="${name}"  value="用户ID:0" class="Input">
                <button class="Button Button2" type="button" onclick="password()">修改密码</button>
            </label>
            <label class="Label">
                <input th:value="${phone}" class="Input" value="手机号:未绑定"  disabled>
                <button class="Button Button2" type="button" onclick="bind('sms')">重新绑定</button>
            </label>
            <label class="Label">
                <input th:value="${wx}" class="Input" value="微信公众平台:未绑定" disabled>
                <button class="Button Button2" type="button" onclick="bind('wx')">重新绑定</button>
            </label>
            <button class="Form-submitButton" type="button" onclick="logout()">退出登录</button>
        </div>


    </form>
</div>

<div class="Footer"><a href="https://beian.miit.gov.cn/" th:text="${beian}">浙ICP备xxxx号</a></div>
</body>

<script>
    function logout() {
        window.location.href="/logout"
    }

    function bind(wx) {
        if (wx && wx==='wx') {
            window.location.href="/bind?wx=true"
        } else {
            window.location.href="/bind?wx=false"
        }
    }

    function password() {
        window.location.href="/reset"
    }

</script>

</html>